<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libnetconf: NETCONF Session</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../libnetconf-logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnetconf
   &#160;<span id="projectnumber">0.10.0-146_trunk</span>
   </div>
   <div id="projectbrief">NETCONF Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('db/d52/group__session.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">NETCONF Session</div>  </div>
</div><!--header-->
<div class="contents">

<p>libnetconf's functions for handling NETCONF sessions.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga85043314eec3f4f8c53234d9af1f2d41"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga85043314eec3f4f8c53234d9af1f2d41">nc_msgid</a>&#160;&#160;&#160;char*</td></tr>
<tr class="memdesc:ga85043314eec3f4f8c53234d9af1f2d41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type representing NETCONF message-id attribute.  <a href="#ga85043314eec3f4f8c53234d9af1f2d41">More...</a><br/></td></tr>
<tr class="separator:ga85043314eec3f4f8c53234d9af1f2d41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga9fba5da8e4c50d2427d0d24e8e7b630c"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga9fba5da8e4c50d2427d0d24e8e7b630c">NC_SESSION_STATUS</a> { <br/>
&#160;&#160;<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca4d07b03d91d5e589af9f17fb88fc6922">NC_SESSION_STATUS_ERROR</a> = -1, 
<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca7f69f00ab7d6af9665f6094c45654502">NC_SESSION_STATUS_STARTUP</a> = 0, 
<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca56a15c8d7ae66a3bf02a13607210598c">NC_SESSION_STATUS_WORKING</a> = 1, 
<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630cafa56bc16f9f7d9ad58a94ef03a7e82e0">NC_SESSION_STATUS_CLOSING</a> = 2, 
<br/>
&#160;&#160;<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca9fe6e4f2dd207f6a66382f8ade448e78">NC_SESSION_STATUS_CLOSED</a> = 3, 
<a class="el" href="../../db/d52/group__session.html#gga9fba5da8e4c50d2427d0d24e8e7b630ca3a417a51dfb315ebb7d1427357a838b2">NC_SESSION_STATUS_DUMMY</a> = 4
<br/>
 }</td></tr>
<tr class="memdesc:ga9fba5da8e4c50d2427d0d24e8e7b630c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration of the possible states of a NETCONF session.  <a href="../../db/d52/group__session.html#ga9fba5da8e4c50d2427d0d24e8e7b630c">More...</a><br/></td></tr>
<tr class="separator:ga9fba5da8e4c50d2427d0d24e8e7b630c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab8fb6ff96d652b9aeb1223729e5694c2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gab8fb6ff96d652b9aeb1223729e5694c2">NC_SESSION_TERM_REASON</a> { <br/>
&#160;&#160;<a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2a0f2c2854f81cf835944a837c89b3b6c3">NC_SESSION_TERM_CLOSED</a>, 
<a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2ad43b0471a6cc0e281bc7eb135a59da00">NC_SESSION_TERM_KILLED</a>, 
<a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2acf0a8c1f1d26f53e5dc1fa7b7020f980">NC_SESSION_TERM_DROPPED</a>, 
<a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2a2cf875e69005171bbe33feb356dcf539">NC_SESSION_TERM_TIMEOUT</a>, 
<br/>
&#160;&#160;<a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2a441729b11f47c4c93dcfb59c9959d70a">NC_SESSION_TERM_BADHELLO</a>, 
<a class="el" href="../../db/d52/group__session.html#ggab8fb6ff96d652b9aeb1223729e5694c2af01550127e61eba3ec255fb909ea932f">NC_SESSION_TERM_OTHER</a>
<br/>
 }</td></tr>
<tr class="memdesc:gab8fb6ff96d652b9aeb1223729e5694c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration of reasons of the NETCONF session termination as defined in RFC 6470.  <a href="../../db/d52/group__session.html#gab8fb6ff96d652b9aeb1223729e5694c2">More...</a><br/></td></tr>
<tr class="separator:gab8fb6ff96d652b9aeb1223729e5694c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad9081cbe1edde22e8612e07ba4c3be10"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gad9081cbe1edde22e8612e07ba4c3be10">NC_SSH_AUTH_TYPE</a> { <a class="el" href="../../db/d52/group__session.html#ggad9081cbe1edde22e8612e07ba4c3be10a33741824ba5809f9e29b99d68e1bb6a3">NC_SSH_AUTH_PUBLIC_KEYS</a> = 1, 
<a class="el" href="../../db/d52/group__session.html#ggad9081cbe1edde22e8612e07ba4c3be10a57ebf13ab1802ab10650d4c4c77e7eef">NC_SSH_AUTH_PASSWORD</a> = 2, 
<a class="el" href="../../db/d52/group__session.html#ggad9081cbe1edde22e8612e07ba4c3be10a497854e455f81123847c1ba089c40158">NC_SSH_AUTH_INTERACTIVE</a> = 4
 }</td></tr>
<tr class="memdesc:gad9081cbe1edde22e8612e07ba4c3be10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Available SSH authentication mechanisms.  <a href="../../db/d52/group__session.html#gad9081cbe1edde22e8612e07ba4c3be10">More...</a><br/></td></tr>
<tr class="separator:gad9081cbe1edde22e8612e07ba4c3be10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8be6ccea205129b05c38331a7a42174a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a> { <a class="el" href="../../db/d52/group__session.html#gga8be6ccea205129b05c38331a7a42174aa914942ddb1fbb24a094f8e6ec5188e6e">NC_TRANSPORT_UNKNOWN</a> = -1, 
<a class="el" href="../../db/d52/group__session.html#gga8be6ccea205129b05c38331a7a42174aa7878cac9e93258d6bb1a2f166377606a">NC_TRANSPORT_SSH</a>, 
<a class="el" href="../../db/d52/group__session.html#gga8be6ccea205129b05c38331a7a42174aa9dfde07fbf3ce02396167716ef70c612">NC_TRANSPORT_TLS</a>
 }</td></tr>
<tr class="memdesc:ga8be6ccea205129b05c38331a7a42174a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Supported NETCONF transport protocols enumeration. To change currently used transport protocol, call <a class="el" href="db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806" title="Set transport protocol for the sessions created by subsequent nc_session_connect() calls...">nc_session_transport()</a>.  <a href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">More...</a><br/></td></tr>
<tr class="separator:ga8be6ccea205129b05c38331a7a42174a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga78a69a69dea0369455218c5aeedce9f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga78a69a69dea0369455218c5aeedce9f8">nc_callback_ssh_host_authenticity_check</a> (int(*func)(const char *hostname, ssh_session session))</td></tr>
<tr class="memdesc:ga78a69a69dea0369455218c5aeedce9f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a callback function to authorize authenticity of the remote host.  <a href="#ga78a69a69dea0369455218c5aeedce9f8">More...</a><br/></td></tr>
<tr class="separator:ga78a69a69dea0369455218c5aeedce9f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga621c3e008285991ba00007f8d44730c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga621c3e008285991ba00007f8d44730c0">nc_callback_sshauth_interactive</a> (char *(*func)(const char *name, const char *instruction, const char *prompt, int echo))</td></tr>
<tr class="memdesc:ga621c3e008285991ba00007f8d44730c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a callback function for passing user credentials into the libssh's keyboard-interactive authentication method.  <a href="#ga621c3e008285991ba00007f8d44730c0">More...</a><br/></td></tr>
<tr class="separator:ga621c3e008285991ba00007f8d44730c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81ef9b1c1949bbffd86cbfd9aa159726"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga81ef9b1c1949bbffd86cbfd9aa159726">nc_callback_sshauth_passphrase</a> (char *(*func)(const char *username, const char *hostname, const char *priv_key_file))</td></tr>
<tr class="memdesc:ga81ef9b1c1949bbffd86cbfd9aa159726"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a callback function for passing the user password into the libssh's publickey authentication method when connecting to 'hostname' as 'username'.  <a href="#ga81ef9b1c1949bbffd86cbfd9aa159726">More...</a><br/></td></tr>
<tr class="separator:ga81ef9b1c1949bbffd86cbfd9aa159726"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28299d575ef4e234ed96bad5c4f086fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga28299d575ef4e234ed96bad5c4f086fb">nc_callback_sshauth_password</a> (char *(*func)(const char *username, const char *hostname))</td></tr>
<tr class="memdesc:ga28299d575ef4e234ed96bad5c4f086fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a callback function for passing the user password into the libssh's password authentication method when connecting to 'hostname' as 'username'.  <a href="#ga28299d575ef4e234ed96bad5c4f086fb">More...</a><br/></td></tr>
<tr class="separator:ga28299d575ef4e234ed96bad5c4f086fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2ea9b318015206d886c7e54386fc85e3"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga2ea9b318015206d886c7e54386fc85e3">nc_cpblts_add</a> (struct nc_cpblts *capabilities, const char *capability_string)</td></tr>
<tr class="memdesc:ga2ea9b318015206d886c7e54386fc85e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add another capability string into the NETCONF capabilities structure.  <a href="#ga2ea9b318015206d886c7e54386fc85e3">More...</a><br/></td></tr>
<tr class="separator:ga2ea9b318015206d886c7e54386fc85e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga79a7aea77cbfe29535eb83a6e5c60419"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga79a7aea77cbfe29535eb83a6e5c60419">nc_cpblts_count</a> (const struct nc_cpblts *c)</td></tr>
<tr class="memdesc:ga79a7aea77cbfe29535eb83a6e5c60419"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of capabilities in the structure.  <a href="#ga79a7aea77cbfe29535eb83a6e5c60419">More...</a><br/></td></tr>
<tr class="separator:ga79a7aea77cbfe29535eb83a6e5c60419"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8325078c33d25a7cf48e1ed9d417ff4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gaa8325078c33d25a7cf48e1ed9d417ff4">nc_cpblts_enabled</a> (const struct nc_session *session, const char *capability_string)</td></tr>
<tr class="memdesc:gaa8325078c33d25a7cf48e1ed9d417ff4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the given capability is supported by the session.  <a href="#gaa8325078c33d25a7cf48e1ed9d417ff4">More...</a><br/></td></tr>
<tr class="separator:gaa8325078c33d25a7cf48e1ed9d417ff4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6465c58b3ca057b46655d5ffa90caff3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga6465c58b3ca057b46655d5ffa90caff3">nc_cpblts_free</a> (struct nc_cpblts *c)</td></tr>
<tr class="memdesc:ga6465c58b3ca057b46655d5ffa90caff3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free NETCONF capabilities structure.  <a href="#ga6465c58b3ca057b46655d5ffa90caff3">More...</a><br/></td></tr>
<tr class="separator:ga6465c58b3ca057b46655d5ffa90caff3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabed55135f1868bef5f266737b8862aa4"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gabed55135f1868bef5f266737b8862aa4">nc_cpblts_get</a> (const struct nc_cpblts *c, const char *capability_string)</td></tr>
<tr class="memdesc:gabed55135f1868bef5f266737b8862aa4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get complete capability string including parameters.  <a href="#gabed55135f1868bef5f266737b8862aa4">More...</a><br/></td></tr>
<tr class="separator:gabed55135f1868bef5f266737b8862aa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaea2ced8d4e5f2cc9971680e49f876c58"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gaea2ced8d4e5f2cc9971680e49f876c58">nc_cpblts_iter_next</a> (struct nc_cpblts *c)</td></tr>
<tr class="memdesc:gaea2ced8d4e5f2cc9971680e49f876c58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next capability string from the given NETCONF capabilities structure.  <a href="#gaea2ced8d4e5f2cc9971680e49f876c58">More...</a><br/></td></tr>
<tr class="separator:gaea2ced8d4e5f2cc9971680e49f876c58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae92c774e940114b4733f85e186d84620"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gae92c774e940114b4733f85e186d84620">nc_cpblts_iter_start</a> (struct nc_cpblts *c)</td></tr>
<tr class="memdesc:gae92c774e940114b4733f85e186d84620"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move NETCONF capabilities structure iterator to the beginning of the capability strings list.  <a href="#gae92c774e940114b4733f85e186d84620">More...</a><br/></td></tr>
<tr class="separator:gae92c774e940114b4733f85e186d84620"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdd04a64fd465ebbf910c6b08393ac43"><td class="memItemLeft" align="right" valign="top">struct nc_cpblts *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gabdd04a64fd465ebbf910c6b08393ac43">nc_cpblts_new</a> (const char *const list[])</td></tr>
<tr class="memdesc:gabdd04a64fd465ebbf910c6b08393ac43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new NETCONF capabilities structure.  <a href="#gabdd04a64fd465ebbf910c6b08393ac43">More...</a><br/></td></tr>
<tr class="separator:gabdd04a64fd465ebbf910c6b08393ac43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb59cf4fa78bf02c22afac395acf0693"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gacb59cf4fa78bf02c22afac395acf0693">nc_cpblts_remove</a> (struct nc_cpblts *capabilities, const char *capability_string)</td></tr>
<tr class="memdesc:gacb59cf4fa78bf02c22afac395acf0693"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the specified capability string from the NETCONF capabilities structure.  <a href="#gacb59cf4fa78bf02c22afac395acf0693">More...</a><br/></td></tr>
<tr class="separator:gacb59cf4fa78bf02c22afac395acf0693"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93972e2d0602d0f3fd2728af279e61c1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga93972e2d0602d0f3fd2728af279e61c1">nc_del_keypair_path</a> (const char *privkey, const char *pubkey)</td></tr>
<tr class="memdesc:ga93972e2d0602d0f3fd2728af279e61c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a private and a public key file.  <a href="#ga93972e2d0602d0f3fd2728af279e61c1">More...</a><br/></td></tr>
<tr class="separator:ga93972e2d0602d0f3fd2728af279e61c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad0e758dfee764ae9c2a032e0151c6707"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gad0e758dfee764ae9c2a032e0151c6707">nc_session_accept</a> (const struct nc_cpblts *capabilities)</td></tr>
<tr class="memdesc:gad0e758dfee764ae9c2a032e0151c6707"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept NETCONF session from a client.  <a href="#gad0e758dfee764ae9c2a032e0151c6707">More...</a><br/></td></tr>
<tr class="separator:gad0e758dfee764ae9c2a032e0151c6707"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4d2da6dc354779dbd7a745147fa40457"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga4d2da6dc354779dbd7a745147fa40457">nc_session_accept_inout</a> (const struct nc_cpblts *capabilities, const char *username, int input, int output)</td></tr>
<tr class="memdesc:ga4d2da6dc354779dbd7a745147fa40457"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept NETCONF session from a client. It allows to assign the specified username to it and set file descriptors for reading/writing NETCONF data.  <a href="#ga4d2da6dc354779dbd7a745147fa40457">More...</a><br/></td></tr>
<tr class="separator:ga4d2da6dc354779dbd7a745147fa40457"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7ee207cac84fd5cd82419af41e14c06f"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga7ee207cac84fd5cd82419af41e14c06f">nc_session_accept_username</a> (const struct nc_cpblts *capabilities, const char *username)</td></tr>
<tr class="memdesc:ga7ee207cac84fd5cd82419af41e14c06f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Accept NETCONF session from a client and assign it to the specified username.  <a href="#ga7ee207cac84fd5cd82419af41e14c06f">More...</a><br/></td></tr>
<tr class="separator:ga7ee207cac84fd5cd82419af41e14c06f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3858d998d19cb2fb700b15fdf602f23"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23">nc_session_connect</a> (const char *host, unsigned short port, const char *username, const struct nc_cpblts *cpblts)</td></tr>
<tr class="memdesc:gae3858d998d19cb2fb700b15fdf602f23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create NETCONF session to the specified server.  <a href="#gae3858d998d19cb2fb700b15fdf602f23">More...</a><br/></td></tr>
<tr class="separator:gae3858d998d19cb2fb700b15fdf602f23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d9e0f17bb4ca5b35c8343db59955060"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga7d9e0f17bb4ca5b35c8343db59955060">nc_session_connect_channel</a> (struct nc_session *session, const struct nc_cpblts *cpblts)</td></tr>
<tr class="memdesc:ga7d9e0f17bb4ca5b35c8343db59955060"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create another NETCONF session using already established SSH session. No authentication is needed in this case.  <a href="#ga7d9e0f17bb4ca5b35c8343db59955060">More...</a><br/></td></tr>
<tr class="separator:ga7d9e0f17bb4ca5b35c8343db59955060"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacaf7b465963605a29f25c3a36df378a6"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gacaf7b465963605a29f25c3a36df378a6">nc_session_connect_inout</a> (int fd_in, int fd_out, const struct nc_cpblts *cpblts, const char *host, const char *port, const char *username, <a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a> transport)</td></tr>
<tr class="memdesc:gacaf7b465963605a29f25c3a36df378a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create NETCONF session communicating via given file descriptors. This is an alternative function to <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a>.  <a href="#gacaf7b465963605a29f25c3a36df378a6">More...</a><br/></td></tr>
<tr class="separator:gacaf7b465963605a29f25c3a36df378a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae721f4b40b7e16a2fe22161378ad9031"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gae721f4b40b7e16a2fe22161378ad9031">nc_session_connect_libssh_sess</a> (const char *host, unsigned short port, const char *username, const struct nc_cpblts *cpblts, ssh_session ssh_sess)</td></tr>
<tr class="memdesc:gae721f4b40b7e16a2fe22161378ad9031"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create NETCONF session to the specified server using a custom SSH session.  <a href="#gae721f4b40b7e16a2fe22161378ad9031">More...</a><br/></td></tr>
<tr class="separator:gae721f4b40b7e16a2fe22161378ad9031"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3868d5331db61a5d3a4df3ff5fa33851"><td class="memItemLeft" align="right" valign="top">struct nc_session *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga3868d5331db61a5d3a4df3ff5fa33851">nc_session_dummy</a> (const char *sid, const char *username, const char *hostname, struct nc_cpblts *capabilities)</td></tr>
<tr class="memdesc:ga3868d5331db61a5d3a4df3ff5fa33851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a disconnected session structure.  <a href="#ga3868d5331db61a5d3a4df3ff5fa33851">More...</a><br/></td></tr>
<tr class="separator:ga3868d5331db61a5d3a4df3ff5fa33851"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa5994f45a7031dc931bdf4a3acebedee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gaa5994f45a7031dc931bdf4a3acebedee">nc_session_free</a> (struct nc_session *session)</td></tr>
<tr class="memdesc:gaa5994f45a7031dc931bdf4a3acebedee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cleanup the session structure and free all the allocated resources.  <a href="#gaa5994f45a7031dc931bdf4a3acebedee">More...</a><br/></td></tr>
<tr class="separator:gaa5994f45a7031dc931bdf4a3acebedee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09bdf1d9eacf9f53bf3f05557ffe0821"><td class="memItemLeft" align="right" valign="top">struct nc_cpblts *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga09bdf1d9eacf9f53bf3f05557ffe0821">nc_session_get_cpblts</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:ga09bdf1d9eacf9f53bf3f05557ffe0821"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get list of capabilities associated with the session.  <a href="#ga09bdf1d9eacf9f53bf3f05557ffe0821">More...</a><br/></td></tr>
<tr class="separator:ga09bdf1d9eacf9f53bf3f05557ffe0821"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8283673aa18f079a89a437efb436a55a"><td class="memItemLeft" align="right" valign="top">struct nc_cpblts *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a">nc_session_get_cpblts_default</a> (void)</td></tr>
<tr class="memdesc:ga8283673aa18f079a89a437efb436a55a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get NULL terminated list of the default capabilities supported by libnetconf including the list of namespaces provided by the datastores created with <a class="el" href="../../db/d67/group__store.html#ga69009c5985f9eec3a6920f98a6a1a5e6" title="Create a new datastore structure of the specified implementation type. ">ncds_new()</a> and initialized by <a class="el" href="../../db/d67/group__store.html#gaabb1ae2c497726ad826fc6478f97e8ff" title="Activate datastore structure for use. ">ncds_init()</a>.  <a href="#ga8283673aa18f079a89a437efb436a55a">More...</a><br/></td></tr>
<tr class="separator:ga8283673aa18f079a89a437efb436a55a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga826890ed745633bc2d31a53971dada32"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga826890ed745633bc2d31a53971dada32">nc_session_get_eventfd</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:ga826890ed745633bc2d31a53971dada32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the input file descriptor to asynchronous control of input events.  <a href="#ga826890ed745633bc2d31a53971dada32">More...</a><br/></td></tr>
<tr class="separator:ga826890ed745633bc2d31a53971dada32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6399681dfce6e139cc5707af25d20bb3"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga6399681dfce6e139cc5707af25d20bb3">nc_session_get_host</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:ga6399681dfce6e139cc5707af25d20bb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get NETCONF session host.  <a href="#ga6399681dfce6e139cc5707af25d20bb3">More...</a><br/></td></tr>
<tr class="separator:ga6399681dfce6e139cc5707af25d20bb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga91012cb5ae50651916ee2239661d7603"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga91012cb5ae50651916ee2239661d7603">nc_session_get_id</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:ga91012cb5ae50651916ee2239661d7603"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get NETCONF session ID.  <a href="#ga91012cb5ae50651916ee2239661d7603">More...</a><br/></td></tr>
<tr class="separator:ga91012cb5ae50651916ee2239661d7603"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga09bec340611b4b99c8c1bfb2ef3992d6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga09bec340611b4b99c8c1bfb2ef3992d6">nc_session_get_port</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:ga09bec340611b4b99c8c1bfb2ef3992d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get NETCONF session port number.  <a href="#ga09bec340611b4b99c8c1bfb2ef3992d6">More...</a><br/></td></tr>
<tr class="separator:ga09bec340611b4b99c8c1bfb2ef3992d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacebd018e30c3eeb0638bbb428a1741b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d52/group__session.html#ga9fba5da8e4c50d2427d0d24e8e7b630c">NC_SESSION_STATUS</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gacebd018e30c3eeb0638bbb428a1741b4">nc_session_get_status</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:gacebd018e30c3eeb0638bbb428a1741b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get information about the session current status.  <a href="#gacebd018e30c3eeb0638bbb428a1741b4">More...</a><br/></td></tr>
<tr class="separator:gacebd018e30c3eeb0638bbb428a1741b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1eae5ae3f6460dcc849733f0965c133c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga1eae5ae3f6460dcc849733f0965c133c">nc_session_get_transport</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:ga1eae5ae3f6460dcc849733f0965c133c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get transport protocol used for the NETCONF session.  <a href="#ga1eae5ae3f6460dcc849733f0965c133c">More...</a><br/></td></tr>
<tr class="separator:ga1eae5ae3f6460dcc849733f0965c133c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabdd090cbc50a8f7db58e5be8062296d6"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gabdd090cbc50a8f7db58e5be8062296d6">nc_session_get_user</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:gabdd090cbc50a8f7db58e5be8062296d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get NETCONF session username.  <a href="#gabdd090cbc50a8f7db58e5be8062296d6">More...</a><br/></td></tr>
<tr class="separator:gabdd090cbc50a8f7db58e5be8062296d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac8ea61702127df024c037869feb72d97"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gac8ea61702127df024c037869feb72d97">nc_session_get_version</a> (const struct nc_session *session)</td></tr>
<tr class="memdesc:gac8ea61702127df024c037869feb72d97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get NETCONF protocol version used in the given session.  <a href="#gac8ea61702127df024c037869feb72d97">More...</a><br/></td></tr>
<tr class="separator:gac8ea61702127df024c037869feb72d97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga023c9c813c59588ab938108f3f063d41"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga023c9c813c59588ab938108f3f063d41">nc_session_monitor</a> (struct nc_session *session)</td></tr>
<tr class="memdesc:ga023c9c813c59588ab938108f3f063d41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add the session into the internal list of monitored sessions that are returned as part of netconf-state information defined in RFC 6022.  <a href="#ga023c9c813c59588ab938108f3f063d41">More...</a><br/></td></tr>
<tr class="separator:ga023c9c813c59588ab938108f3f063d41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafd3b69869e102a4625a5ffb490b4d70f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gafd3b69869e102a4625a5ffb490b4d70f">nc_session_notif_allowed</a> (struct nc_session *session)</td></tr>
<tr class="memdesc:gafd3b69869e102a4625a5ffb490b4d70f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell me if the notification subscription is allowed on the given session.  <a href="#gafd3b69869e102a4625a5ffb490b4d70f">More...</a><br/></td></tr>
<tr class="separator:gafd3b69869e102a4625a5ffb490b4d70f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e125c035cdebae8c49ff962866c0806"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806">nc_session_transport</a> (<a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a> proto)</td></tr>
<tr class="memdesc:ga6e125c035cdebae8c49ff962866c0806"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set transport protocol for the sessions created by subsequent <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a> calls. By default, transport protocol is set to <a class="el" href="../../db/d52/group__session.html#gga8be6ccea205129b05c38331a7a42174aa7878cac9e93258d6bb1a2f166377606a">NC_TRANSPORT_SSH</a>.  <a href="#ga6e125c035cdebae8c49ff962866c0806">More...</a><br/></td></tr>
<tr class="separator:ga6e125c035cdebae8c49ff962866c0806"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad067c538c9c44117a99cb0620e135108"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#gad067c538c9c44117a99cb0620e135108">nc_set_keypair_path</a> (const char *privkey, const char *pubkey)</td></tr>
<tr class="memdesc:gad067c538c9c44117a99cb0620e135108"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set path to a private and a public key file used in case of SSH authentication via a publickey mechanism.  <a href="#gad067c538c9c44117a99cb0620e135108">More...</a><br/></td></tr>
<tr class="separator:gad067c538c9c44117a99cb0620e135108"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga13119fdaa84544bf254bdb35ffdf83e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d52/group__session.html#ga13119fdaa84544bf254bdb35ffdf83e0">nc_ssh_pref</a> (<a class="el" href="../../db/d52/group__session.html#gad9081cbe1edde22e8612e07ba4c3be10">NC_SSH_AUTH_TYPE</a> type, short int preference)</td></tr>
<tr class="memdesc:ga13119fdaa84544bf254bdb35ffdf83e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the preference of the SSH authentication methods.  <a href="#ga13119fdaa84544bf254bdb35ffdf83e0">More...</a><br/></td></tr>
<tr class="separator:ga13119fdaa84544bf254bdb35ffdf83e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>libnetconf's functions for handling NETCONF sessions. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga85043314eec3f4f8c53234d9af1f2d41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define nc_msgid&#160;&#160;&#160;char*</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type representing NETCONF message-id attribute. </p>
<p>It corresponds to the following typedef: typedef char* nc_msgid;</p>
<p>We use a macro to avoid compiler warning of 'const nc_msgid' as return type of functions (because const is applied as 'char* const funct()' which is meaningless).</p>
<p>Yes, I know that const char* means "pointer to constant character (not
string)", but I want to be clear from the API, that function returns pointer to something that should not be changed. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga9fba5da8e4c50d2427d0d24e8e7b630c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../db/d52/group__session.html#ga9fba5da8e4c50d2427d0d24e8e7b630c">NC_SESSION_STATUS</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enumeration of the possible states of a NETCONF session. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga9fba5da8e4c50d2427d0d24e8e7b630ca4d07b03d91d5e589af9f17fb88fc6922"></a>NC_SESSION_STATUS_ERROR</em>&#160;</td><td class="fielddoc">
<p>undefined status or the error return code </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga9fba5da8e4c50d2427d0d24e8e7b630ca7f69f00ab7d6af9665f6094c45654502"></a>NC_SESSION_STATUS_STARTUP</em>&#160;</td><td class="fielddoc">
<p>session is setting up </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga9fba5da8e4c50d2427d0d24e8e7b630ca56a15c8d7ae66a3bf02a13607210598c"></a>NC_SESSION_STATUS_WORKING</em>&#160;</td><td class="fielddoc">
<p>session is established and ready to work </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga9fba5da8e4c50d2427d0d24e8e7b630cafa56bc16f9f7d9ad58a94ef03a7e82e0"></a>NC_SESSION_STATUS_CLOSING</em>&#160;</td><td class="fielddoc">
<p>session is being closed </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga9fba5da8e4c50d2427d0d24e8e7b630ca9fe6e4f2dd207f6a66382f8ade448e78"></a>NC_SESSION_STATUS_CLOSED</em>&#160;</td><td class="fielddoc">
<p>session was closed and could not be used for communication </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga9fba5da8e4c50d2427d0d24e8e7b630ca3a417a51dfb315ebb7d1427357a838b2"></a>NC_SESSION_STATUS_DUMMY</em>&#160;</td><td class="fielddoc">
<p>session is DUMMY, only holds information, does not provide connection </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gab8fb6ff96d652b9aeb1223729e5694c2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../db/d52/group__session.html#gab8fb6ff96d652b9aeb1223729e5694c2">NC_SESSION_TERM_REASON</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enumeration of reasons of the NETCONF session termination as defined in RFC 6470. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggab8fb6ff96d652b9aeb1223729e5694c2a0f2c2854f81cf835944a837c89b3b6c3"></a>NC_SESSION_TERM_CLOSED</em>&#160;</td><td class="fielddoc">
<p>closed by client in a normal fashion </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggab8fb6ff96d652b9aeb1223729e5694c2ad43b0471a6cc0e281bc7eb135a59da00"></a>NC_SESSION_TERM_KILLED</em>&#160;</td><td class="fielddoc">
<p>session was terminated by &lt;kill-session&gt; operation </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggab8fb6ff96d652b9aeb1223729e5694c2acf0a8c1f1d26f53e5dc1fa7b7020f980"></a>NC_SESSION_TERM_DROPPED</em>&#160;</td><td class="fielddoc">
<p>transport layer connection was unexpectedly closed </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggab8fb6ff96d652b9aeb1223729e5694c2a2cf875e69005171bbe33feb356dcf539"></a>NC_SESSION_TERM_TIMEOUT</em>&#160;</td><td class="fielddoc">
<p>terminated because of inactivity </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggab8fb6ff96d652b9aeb1223729e5694c2a441729b11f47c4c93dcfb59c9959d70a"></a>NC_SESSION_TERM_BADHELLO</em>&#160;</td><td class="fielddoc">
<p>&lt;hello&gt; message was invalid </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggab8fb6ff96d652b9aeb1223729e5694c2af01550127e61eba3ec255fb909ea932f"></a>NC_SESSION_TERM_OTHER</em>&#160;</td><td class="fielddoc">
<p>terminated for some other reason </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gad9081cbe1edde22e8612e07ba4c3be10"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../db/d52/group__session.html#gad9081cbe1edde22e8612e07ba4c3be10">NC_SSH_AUTH_TYPE</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Available SSH authentication mechanisms. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggad9081cbe1edde22e8612e07ba4c3be10a33741824ba5809f9e29b99d68e1bb6a3"></a>NC_SSH_AUTH_PUBLIC_KEYS</em>&#160;</td><td class="fielddoc">
<p>SSH user authorization via publickeys </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggad9081cbe1edde22e8612e07ba4c3be10a57ebf13ab1802ab10650d4c4c77e7eef"></a>NC_SSH_AUTH_PASSWORD</em>&#160;</td><td class="fielddoc">
<p>SSH user authorization via password </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggad9081cbe1edde22e8612e07ba4c3be10a497854e455f81123847c1ba089c40158"></a>NC_SSH_AUTH_INTERACTIVE</em>&#160;</td><td class="fielddoc">
<p>interactive SSH user authorization </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga8be6ccea205129b05c38331a7a42174a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Supported NETCONF transport protocols enumeration. To change currently used transport protocol, call <a class="el" href="../../db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806" title="Set transport protocol for the sessions created by subsequent nc_session_connect() calls...">nc_session_transport()</a>. </p>
<p>Note that NC_TRANSPORT_TLS is supported only when libnetconf is compiled with &ndash;enable-tls configure's option. If the option is not used, <a class="el" href="../../db/d52/group__session.html#ga6e125c035cdebae8c49ff962866c0806" title="Set transport protocol for the sessions created by subsequent nc_session_connect() calls...">nc_session_transport()</a> returns EXIT_FAILURE with NC_TRANSPORT_TLS value.</p>
<p>This setting is valuable only for client side NETCONF applications. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga8be6ccea205129b05c38331a7a42174aa914942ddb1fbb24a094f8e6ec5188e6e"></a>NC_TRANSPORT_UNKNOWN</em>&#160;</td><td class="fielddoc">
<p>Unknown transport protocol, this is not acceptable as input value </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga8be6ccea205129b05c38331a7a42174aa7878cac9e93258d6bb1a2f166377606a"></a>NC_TRANSPORT_SSH</em>&#160;</td><td class="fielddoc">
<p>NETCONF over SSH, this value is used by default </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga8be6ccea205129b05c38331a7a42174aa9dfde07fbf3ce02396167716ef70c612"></a>NC_TRANSPORT_TLS</em>&#160;</td><td class="fielddoc">
<p>NETCONF over TLS </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga78a69a69dea0369455218c5aeedce9f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_callback_ssh_host_authenticity_check </td>
          <td>(</td>
          <td class="paramtype">int(*)(const char *hostname, ssh_session session)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a callback function to authorize authenticity of the remote host. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a>.</p>
<p>If the func parameter is NULL, the callback is set back to the default function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callback function to use. Expected callback return values are:<ul>
<li>EXIT_SUCCESS - hosts and keys match, the SSH session establishment will continue.</li>
<li>EXIT_FAILURE - keys do not match or an error occurred. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga621c3e008285991ba00007f8d44730c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_callback_sshauth_interactive </td>
          <td>(</td>
          <td class="paramtype">char *(*)(const char *name, const char *instruction, const char *prompt, int echo)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a callback function for passing user credentials into the libssh's keyboard-interactive authentication method. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a>.</p>
<p>If the func parameter is NULL, the callback is set back to the default function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callback function to use for interactive authentication. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga81ef9b1c1949bbffd86cbfd9aa159726"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_callback_sshauth_passphrase </td>
          <td>(</td>
          <td class="paramtype">char *(*)(const char *username, const char *hostname, const char *priv_key_file)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a callback function for passing the user password into the libssh's publickey authentication method when connecting to 'hostname' as 'username'. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a>.</p>
<p>If the func parameter is NULL, the callback is set back to the default function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callback function to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga28299d575ef4e234ed96bad5c4f086fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_callback_sshauth_password </td>
          <td>(</td>
          <td class="paramtype">char *(*)(const char *username, const char *hostname)&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a callback function for passing the user password into the libssh's password authentication method when connecting to 'hostname' as 'username'. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a>.</p>
<p>If the func parameter is NULL, the callback is set back to the default function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Callback function to use. The callback function should return a password string for the given username and name of the remote host. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2ea9b318015206d886c7e54386fc85e3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_cpblts_add </td>
          <td>(</td>
          <td class="paramtype">struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>capability_string</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add another capability string into the NETCONF capabilities structure. </p>
<p>This function is NOT thread safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capabilities</td><td>Current NETCONF capabilities structure. </td></tr>
    <tr><td class="paramname">capability_string</td><td>Capability string to add. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success<br/>
 non-zero on error </dd></dl>

</div>
</div>
<a class="anchor" id="ga79a7aea77cbfe29535eb83a6e5c60419"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_cpblts_count </td>
          <td>(</td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of capabilities in the structure. </p>
<p>Use this function to get the count of capabilities held by nc_cpblts structure.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>NETCONF capabilities structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of capabilities held by structure c. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa8325078c33d25a7cf48e1ed9d417ff4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_cpblts_enabled </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>capability_string</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the given capability is supported by the session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Established session where the given capability support will be checked. </td></tr>
    <tr><td class="paramname">capability_string</td><td>NETCONF capability string to check. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 for false result, 1 if the given capability is supported. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6465c58b3ca057b46655d5ffa90caff3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_cpblts_free </td>
          <td>(</td>
          <td class="paramtype">struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free NETCONF capabilities structure. </p>
<p>This function is NOT thread safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>Capabilities structure to free. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabed55135f1868bef5f266737b8862aa4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* nc_cpblts_get </td>
          <td>(</td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>capability_string</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get complete capability string including parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>Capabilities structure to be examined </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">capability_string</td><td>Capability identifier, parameters are ignored and only basic identifier is used to retrieve specific identifier including parameters from the given capability structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Constant capability identifier including parameters </dd></dl>

</div>
</div>
<a class="anchor" id="gaea2ced8d4e5f2cc9971680e49f876c58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* nc_cpblts_iter_next </td>
          <td>(</td>
          <td class="paramtype">struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the next capability string from the given NETCONF capabilities structure. </p>
<p>To move iterator to the beginning of the capability strings list, use <a class="el" href="../../db/d52/group__session.html#gae92c774e940114b4733f85e186d84620" title="Move NETCONF capabilities structure iterator to the beginning of the capability strings list...">nc_cpblts_iter_start()</a>.</p>
<p>This function is NOT thread safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>NETCONF capabilities structure to be iterated. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Another capability string, NULL if all strings were already returned. </dd></dl>

</div>
</div>
<a class="anchor" id="gae92c774e940114b4733f85e186d84620"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_cpblts_iter_start </td>
          <td>(</td>
          <td class="paramtype">struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move NETCONF capabilities structure iterator to the beginning of the capability strings list. </p>
<p>This function is NOT thread safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>NETCONF capabilities structure to be iterated. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabdd04a64fd465ebbf910c6b08393ac43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_cpblts* nc_cpblts_new </td>
          <td>(</td>
          <td class="paramtype">const char *const&#160;</td>
          <td class="paramname"><em>list</em>[]</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a new NETCONF capabilities structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>NULL terminated list of capabilities strings to initially add into the NETCONF capabilities structure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Created NETCONF capabilities structure. </dd></dl>

</div>
</div>
<a class="anchor" id="gacb59cf4fa78bf02c22afac395acf0693"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_cpblts_remove </td>
          <td>(</td>
          <td class="paramtype">struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>capability_string</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove the specified capability string from the NETCONF capabilities structure. </p>
<p>This function is NOT thread safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capabilities</td><td>Current NETCONF capabilities structure. </td></tr>
    <tr><td class="paramname">capability_string</td><td>Capability string to remove. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success<br/>
 non-zero on error </dd></dl>

</div>
</div>
<a class="anchor" id="ga93972e2d0602d0f3fd2728af279e61c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_del_keypair_path </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>privkey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pubkey</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove a private and a public key file. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">privkey</td><td>Path to the private key file. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pubkey</td><td>Path to the public key file</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>EXIT_SUCCES or EXIT_FAILURE </dd></dl>

</div>
</div>
<a class="anchor" id="gad0e758dfee764ae9c2a032e0151c6707"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_accept </td>
          <td>(</td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>capabilities</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accept NETCONF session from a client. </p>
<p>The caller process of this function is supposed to be launched as a subprocess of the transport protocol server (in case of SSH, it is called SSH Subsystem). Username assigned to the NETCONF session is guessed from the process's UID. This approach supposes that the transport protocol server launches the caller process with the changed UID according to the user logged in (OpenSSH's sshd does this, stunnel does not - see <a class="el" href="../../db/d52/group__session.html#ga7ee207cac84fd5cd82419af41e14c06f" title="Accept NETCONF session from a client and assign it to the specified username. ">nc_session_accept_username()</a> instead of this function).</p>
<p>Only one NETCONF session can be accepted in a single caller since it communicates with the transport protocol server directly via (redirected) stdin and stdout streams.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">capabilities</td><td>NETCONF capabilities structure with the capabilities supported by the server. The caller can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the accepted NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="ga4d2da6dc354779dbd7a745147fa40457"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_accept_inout </td>
          <td>(</td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accept NETCONF session from a client. It allows to assign the specified username to it and set file descriptors for reading/writing NETCONF data. </p>
<p>The same as <a class="el" href="../../db/d52/group__session.html#ga7ee207cac84fd5cd82419af41e14c06f" title="Accept NETCONF session from a client and assign it to the specified username. ">nc_session_accept_username()</a> except that it allows caller to set file descriptors where the libnetconf will read/write NETCONF (unencrypted) data.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">capabilities</td><td>NETCONF capabilities structure with the capabilities supported by the server. The caller can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user which will be assigned to the NETCONF session. This information is used for example by NACM subsystem. If NULL, the function act the same way as the <a class="el" href="../../db/d52/group__session.html#gad0e758dfee764ae9c2a032e0151c6707" title="Accept NETCONF session from a client. ">nc_session_accept()</a> function. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>File descriptor from which the NETCONF data will be read. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>File descriptor to which the NETCONF data will be written. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the accepted NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7ee207cac84fd5cd82419af41e14c06f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_accept_username </td>
          <td>(</td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Accept NETCONF session from a client and assign it to the specified username. </p>
<p>The same as <a class="el" href="../../db/d52/group__session.html#gad0e758dfee764ae9c2a032e0151c6707" title="Accept NETCONF session from a client. ">nc_session_accept()</a> except that instead of guessing username from the process's UID, the specified username is assigned to the NETCONF session. This can be used especially in case that the transport protocol server (sshd, stunnel,...) does not change process's UID automatically.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">capabilities</td><td>NETCONF capabilities structure with the capabilities supported by the server. The caller can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user which will be assigned to the NETCONF session. This information is used for example by NACM subsystem. If NULL, the function act the same way as the <a class="el" href="../../db/d52/group__session.html#gad0e758dfee764ae9c2a032e0151c6707" title="Accept NETCONF session from a client. ">nc_session_accept()</a> function. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the accepted NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="gae3858d998d19cb2fb700b15fdf602f23"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_connect </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>cpblts</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create NETCONF session to the specified server. </p>
<p>This function can internally use various callbacks set by the client to perform SSH authentication. It selects authentication mechanism from the list provided by the SSH server and based on the preferences set by the client via <a class="el" href="../../db/d52/group__session.html#ga13119fdaa84544bf254bdb35ffdf83e0" title="Set the preference of the SSH authentication methods. ">nc_ssh_pref()</a>. Then, appropriate callback function (set by <a class="el" href="../../db/d52/group__session.html#ga28299d575ef4e234ed96bad5c4f086fb" title="Set a callback function for passing the user password into the libssh&#39;s password authentication metho...">nc_callback_sshauth_password()</a>, <a class="el" href="../../db/d52/group__session.html#ga81ef9b1c1949bbffd86cbfd9aa159726" title="Set a callback function for passing the user password into the libssh&#39;s publickey authentication meth...">nc_callback_sshauth_passphrase()</a>, nc_set_publickey_path() or nc_set_privatekey_path()) is used to perform the authentication.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">host</td><td>Hostname or address (both Ipv4 and IPv6 are accepted). 'localhost' is used by default if NULL is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>Port number of the server. Default value 830 is used if 0 is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user to login to the server. The user running the application (detected from the effective UID) is used if NULL is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cpblts</td><td>NETCONF capabilities structure with capabilities supported by the client. Client can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="ga7d9e0f17bb4ca5b35c8343db59955060"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_connect_channel </td>
          <td>(</td>
          <td class="paramtype">struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>cpblts</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create another NETCONF session using already established SSH session. No authentication is needed in this case. </p>
<p>This function works only if libnetconf is compiled with using libssh.</p>
<p>It is not applicable to the sessions created by <a class="el" href="../../db/d52/group__session.html#gacaf7b465963605a29f25c3a36df378a6" title="Create NETCONF session communicating via given file descriptors. This is an alternative function to n...">nc_session_connect_inout()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Already established NETCONF session using <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cpblts</td><td>NETCONF capabilities structure with capabilities supported by the client. Client can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="gacaf7b465963605a29f25c3a36df378a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_connect_inout </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd_in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd_out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>cpblts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a>&#160;</td>
          <td class="paramname"><em>transport</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create NETCONF session communicating via given file descriptors. This is an alternative function to <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a>. </p>
<p>In this case the initiation of the transport session (SSH, TLS, ...) is done externally. libnetconf just uses provided file descriptors to read data from and write data to that external entity (process, functions,...).</p>
<p>Before calling this function, all necessary authentication process must be done so libnetconf can directly start with &lt;hello&gt; messages performing the NETCONF handshake.</p>
<p>Since connecting to a host and authentication is done before, the provided host, port, username anf transport arguments are only informative and libnetconf use them only for returning value by nc_session_get_*() functions. The cpblts argument is used during the NETCONF handshake in the same way as in the <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a> function.</p>
<p>It is not allowed to use <a class="el" href="../../db/d52/group__session.html#ga7d9e0f17bb4ca5b35c8343db59955060" title="Create another NETCONF session using already established SSH session. No authentication is needed in ...">nc_session_connect_channel()</a> on the session created by this function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">fd_in</td><td>Opened file desriptor where the (unencrypted) data from the NETCONF server are read. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fd_out</td><td>Opened file desriptor where the (unencrypted) data to the NETCONF server are written. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cpblts</td><td>NETCONF capabilities structure with capabilities supported by the client. Client can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">host</td><td>Name of the host where we are connected to via the provided file descriptors. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>The port number of the remote host where we are connected. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user we are connected to the remote host as. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">transport</td><td>The transport protocol used to connect to the remote host. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae721f4b40b7e16a2fe22161378ad9031"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_connect_libssh_sess </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>cpblts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ssh_session&#160;</td>
          <td class="paramname"><em>ssh_sess</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create NETCONF session to the specified server using a custom SSH session. </p>
<p>This function works only if libnetconf is compiled with using libssh.</p>
<p>It shares all the functionality of <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a>, but also enables to use a customized SSH session with some specific options set.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">host</td><td>Hostname or address (both Ipv4 and IPv6 are accepted). 'localhost' is used by default if NULL is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>Port number of the server. Default value 830 is used if 0 is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user to login to the server. The user running the application (detected from the effective UID) is used if NULL is specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cpblts</td><td>NETCONF capabilities structure with capabilities supported by the client. Client can use <a class="el" href="../../db/d52/group__session.html#ga8283673aa18f079a89a437efb436a55a" title="Get NULL terminated list of the default capabilities supported by libnetconf including the list of na...">nc_session_get_cpblts_default()</a> to get the structure with the list of all the capabilities supported by libnetconf (this is used in case of a NULL parameter). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ssh_sess</td><td>Customized libssh SSH session structure. Options SSH_OPTIONS_HOST, SSH_OPTIONS_USER, SSH_OPTIONS_FD, and SSH_OPTIONS_TIMEOUT should not be set as they will get set internally and previous values will be ignored. The structure will get freed and it should not be manipulated after passed as a parameter. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing the NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="ga3868d5331db61a5d3a4df3ff5fa33851"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_session* nc_session_dummy </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>hostname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct nc_cpblts *&#160;</td>
          <td class="paramname"><em>capabilities</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a disconnected session structure. </p>
<p>This creates a dummy session structure which is not supposed to exchange NETCONF messages between client and server. Instead, it can be successfully used by server (e.g. detached process that doesn't hold the real session structure) to access NETCONF datastores via libnetconf.</p>
<p>All the required parameters can be obtained from the real session structure by the session getter functions (<a class="el" href="../../db/d52/group__session.html#ga91012cb5ae50651916ee2239661d7603" title="Get NETCONF session ID. ">nc_session_get_id()</a>, <a class="el" href="../../db/d52/group__session.html#gabdd090cbc50a8f7db58e5be8062296d6" title="Get NETCONF session username. ">nc_session_get_user()</a> and <a class="el" href="../../db/d52/group__session.html#ga09bdf1d9eacf9f53bf3f05557ffe0821" title="Get list of capabilities associated with the session. ">nc_session_get_cpblts()</a>). NULL values are not allowed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">sid</td><td>Session ID. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">username</td><td>Name of the user holding the session. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hostname</td><td>Name (domain name, IP) of the opposite communication side (optional parameter, can be NULL). </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">capabilities</td><td>List of capabilities supported by the session. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Structure describing a dummy NETCONF session or NULL in case of an error. </dd></dl>

</div>
</div>
<a class="anchor" id="gaa5994f45a7031dc931bdf4a3acebedee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_session_free </td>
          <td>(</td>
          <td class="paramtype">struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Cleanup the session structure and free all the allocated resources. </p>
<p>Do not use the given session structure after this call. If this session was created with <a class="el" href="../../d5/d22/libnetconf__tls_8h.html#a9cc131efe272d1309653cb7cf445fa32">nc_session_accept_tls()</a> or <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html#a159471d23a8253670ae176615f16965b">nc_session_accept_libssh_channel()</a>, the library transport structures are not freed or modified in any way.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>Session to free. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga09bdf1d9eacf9f53bf3f05557ffe0821"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_cpblts* nc_session_get_cpblts </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get list of capabilities associated with the session. </p>
<p>Returned structure is connected with the session. Do not free or modify it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NETCONF capabilities structure containing capabilities associated with the given session. NULL is returned on error. </dd></dl>

</div>
</div>
<a class="anchor" id="ga8283673aa18f079a89a437efb436a55a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct nc_cpblts* nc_session_get_cpblts_default </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get NULL terminated list of the default capabilities supported by libnetconf including the list of namespaces provided by the datastores created with <a class="el" href="../../db/d67/group__store.html#ga69009c5985f9eec3a6920f98a6a1a5e6" title="Create a new datastore structure of the specified implementation type. ">ncds_new()</a> and initialized by <a class="el" href="../../db/d67/group__store.html#gaabb1ae2c497726ad826fc6478f97e8ff" title="Activate datastore structure for use. ">ncds_init()</a>. </p>
<p>The caller is supposed to free the returned structure with <a class="el" href="../../db/d52/group__session.html#ga6465c58b3ca057b46655d5ffa90caff3" title="Free NETCONF capabilities structure. ">nc_cpblts_free()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>NETCONF capabilities structure containing capabilities supported by libnetconf. </dd></dl>

</div>
</div>
<a class="anchor" id="ga826890ed745633bc2d31a53971dada32"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_session_get_eventfd </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the input file descriptor to asynchronous control of input events. </p>
<p>The caller must avoid direct reading from the returned file descriptor. It is supposed to be used only by select, poll, epoll or an event library (e.g. libevent).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Input file descriptor of the communication channel. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6399681dfce6e139cc5707af25d20bb3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* nc_session_get_host </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get NETCONF session host. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Constant string identifying NETCONF session server host. </dd></dl>

</div>
</div>
<a class="anchor" id="ga91012cb5ae50651916ee2239661d7603"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* nc_session_get_id </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get NETCONF session ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Constant string identifying NETCONF session. </dd></dl>

</div>
</div>
<a class="anchor" id="ga09bec340611b4b99c8c1bfb2ef3992d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* nc_session_get_port </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get NETCONF session port number. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Constant string identifying NETCONF session server host. </dd></dl>

</div>
</div>
<a class="anchor" id="gacebd018e30c3eeb0638bbb428a1741b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d52/group__session.html#ga9fba5da8e4c50d2427d0d24e8e7b630c">NC_SESSION_STATUS</a> nc_session_get_status </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get information about the session current status. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NETCONF session status. </dd></dl>

</div>
</div>
<a class="anchor" id="ga1eae5ae3f6460dcc849733f0965c133c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a> nc_session_get_transport </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get transport protocol used for the NETCONF session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>one of NC_TRANSPORT enumeration values. </dd></dl>

</div>
</div>
<a class="anchor" id="gabdd090cbc50a8f7db58e5be8062296d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* nc_session_get_user </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get NETCONF session username. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Constant string identifying NETCONF session server host. </dd></dl>

</div>
</div>
<a class="anchor" id="gac8ea61702127df024c037869feb72d97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_session_get_version </td>
          <td>(</td>
          <td class="paramtype">const struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get NETCONF protocol version used in the given session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NETCONF protocol version, 0 for 1.0, 1 for 1.1 </dd></dl>

</div>
</div>
<a class="anchor" id="ga023c9c813c59588ab938108f3f063d41"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_session_monitor </td>
          <td>(</td>
          <td class="paramtype">struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add the session into the internal list of monitored sessions that are returned as part of netconf-state information defined in RFC 6022. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to be monitored; </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, non-zero on error. </dd></dl>

</div>
</div>
<a class="anchor" id="gafd3b69869e102a4625a5ffb490b4d70f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_session_notif_allowed </td>
          <td>(</td>
          <td class="paramtype">struct nc_session *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tell me if the notification subscription is allowed on the given session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">session</td><td>NETCONF session structure </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 if not, 1 if subscription is currently allowed. </dd></dl>

</div>
</div>
<a class="anchor" id="ga6e125c035cdebae8c49ff962866c0806"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_session_transport </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/d52/group__session.html#ga8be6ccea205129b05c38331a7a42174a">NC_TRANSPORT</a>&#160;</td>
          <td class="paramname"><em>proto</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set transport protocol for the sessions created by subsequent <a class="el" href="../../db/d52/group__session.html#gae3858d998d19cb2fb700b15fdf602f23" title="Create NETCONF session to the specified server. ">nc_session_connect()</a> calls. By default, transport protocol is set to <a class="el" href="../../db/d52/group__session.html#gga8be6ccea205129b05c38331a7a42174aa7878cac9e93258d6bb1a2f166377606a">NC_TRANSPORT_SSH</a>. </p>
<p>This function is thread-safe. Change made by calling this function applies only to the current thread. </p>

</div>
</div>
<a class="anchor" id="gad067c538c9c44117a99cb0620e135108"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int nc_set_keypair_path </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>privkey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pubkey</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set path to a private and a public key file used in case of SSH authentication via a publickey mechanism. </p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">privkey</td><td>Path to the private key file. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pubkey</td><td>Path to the public key file</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>EXIT_SUCCES or EXIT_FAILURE </dd></dl>

</div>
</div>
<a class="anchor" id="ga13119fdaa84544bf254bdb35ffdf83e0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nc_ssh_pref </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../db/d52/group__session.html#gad9081cbe1edde22e8612e07ba4c3be10">NC_SSH_AUTH_TYPE</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int&#160;</td>
          <td class="paramname"><em>preference</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the preference of the SSH authentication methods. </p>
<p>Allowed authentication types are defined as NC_SSH_AUTH_TYPE type. The default preferences are:</p>
<ol type="1">
<li>interactive (3)</li>
<li>password (2)</li>
<li>public keys (1)</li>
</ol>
<p>This function has no effect with configure's &ndash;disable-libssh option.</p>
<p>To make this function available, you have to include <a class="el" href="../../d1/da1/libnetconf__ssh_8h.html" title="libnetconf&#39;s header for control libssh. ">libnetconf_ssh.h</a> header file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Setting preference for the given authentication type. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">preference</td><td>Preference value. Higher value means higher preference. Negative value disables the given authentication type. On equality of values, the last set authentication type is preferred. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Fri Apr 15 2016 09:20:09 for libnetconf by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
